from django.urls import re_path

from rest_framework.documentation import include_docs_urls
from rest_framework.urlpatterns import format_suffix_patterns

from app.apps import CurrentAppConfig

from .views import *


API_TITLE = 'API Documents'
API_DESCRIPTION = 'API Information'

app_name = CurrentAppConfig.name


urlpatterns = format_suffix_patterns([
    re_path(r'', include_docs_urls(title=API_TITLE, description=API_DESCRIPTION)),
    # 绑定手机号
    re_path(r'^bind_mobile/$', BindMobileView.as_view(), name='bind_mobile'),
    # 用户反馈接口
    re_path(r'^feedback/$', FeedBackCreateView.as_view(), name='feedback'),
    # 获取验证码
    re_path(r'^get_code/$', GetCodeView.as_view(), name='get_code'),
    # 首页数据接口
    re_path(r'^home_page/$', HomePageView.as_view(), name='home_page'),
    # 微信登录
    re_path(r'^wx_login/$', WxLoginView.as_view(), name='wx_login'),
    re_path(r'^mobile_login/$', MobileLoginView.as_view(), name='mobile_login'),
    # 获取文档内容
    re_path(r'^get_doc/$', GetDocView.as_view(), name='get_doc'),
    # 获取文档内容
    re_path(r'^get_hot_search/$', GetHotSearchView.as_view(), name='get_hot_search'),
    re_path(r'^get_wx_token/$', GetWxTokenView.as_view(), name='get_wx_token'),
])
